import Cookies from 'js-cookie'

const TokenKey = 'hrsaas_token'
const tokenTimeStamp = 'hrsaas_token_timeStamp'
export function getToken() {
    return Cookies.get(TokenKey)
}

export function setToken(token) {
    return Cookies.set(TokenKey, token)
}

export function removeToken() {
    return Cookies.remove(TokenKey)
}
//存入登录的时间
export function setTimeStamp() {
    return Cookies.set(tokenTimeStamp, Date.now())
}
//获取登录的时间
export function getTimeStamp() {
    return Cookies.get(tokenTimeStamp)
}